let ba=new Vue({
    el:'#main',
    data:{

    },
    created(){
        
        $.get('http://localhost:8080/cinema/api/FilmPaiMingServlet.do', function (dto) {
            let formData1 = {
                filmId: dto.value[0].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData1, function (dto1) {
                localStorage.setItem("filmName1",dto1.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData1, function (dto11) {
                localStorage.setItem("count1",dto11.value);
            });



            let formData2 = {
                filmId: dto.value[1].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData2, function (dto2) {
                localStorage.setItem("filmName2",dto2.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData2, function (dto22) {
                localStorage.setItem("count2",dto22.value);
            });



            let formData3 = {
                filmId: dto.value[2].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData3, function (dto3) {
                localStorage.setItem("filmName3",dto3.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData3, function (dto33) {
                localStorage.setItem("count3",dto33.value);
            });


            let formData4 = {
                filmId: dto.value[3].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData4, function (dto4) {
                localStorage.setItem("filmName4",dto4.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData4, function (dto44) {
                localStorage.setItem("count4",dto44.value);
            });



            let formData5 = {
                filmId: dto.value[4].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData5, function (dto5) {
                localStorage.setItem("filmName5",dto5.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData5, function (dto55) {
                localStorage.setItem("count5",dto55.value);
            });



            let formData6 = {
                filmId: dto.value[5].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData6, function (dto6) {
                localStorage.setItem("filmName6",dto6.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData6, function (dto66) {
                localStorage.setItem("count6",dto66.value);
            });


            let formData7 = {
                filmId: dto.value[6].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData7, function (dto7) { 
                localStorage.setItem("filmName7",dto7.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData7, function (dto77) {
                localStorage.setItem("count7",dto77.value);
            });



            let formData8 = {
                filmId: dto.value[7].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData8, function (dto8) {
                localStorage.setItem("filmName8",dto8.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData8, function (dto88) {
                localStorage.setItem("count8",dto88.value);
            });



            let formData9 = {
                filmId: dto.value[8].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData9, function (dto9) {
                localStorage.setItem("filmName9",dto9.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData9, function (dto99) {
                localStorage.setItem("count9",dto99.value);
            });



            let formData10 = {
                filmId: dto.value[9].filmId
            }
            $.get('http://localhost:8080/cinema/api/SelectFilmByIdServlet.do', formData10, function (dto10) {
                localStorage.setItem("filmName10",dto10.value.filmName);
            });
            $.get('http://localhost:8080/cinema/api/SelectCountByFilmIdServlet.do', formData10, function (dto100) {
                localStorage.setItem("count10",dto100.value);
            });

        });
        
    }
});